<template>
	<view class="content">
		<view class="borde-padd-24">
			<view class="scroll-view_H" scroll-x="true" >
				<view id="demo1" class="scroll-view-item_H" @click="goPages('/record/adviser/index?id='+item.id)" v-for="(item,index) in unifiendLists">
					<view class="scroll-viewconter">
						<image style="width: 700rpx; height: 394rpx;border-radius: 24rpx;" :src="item.image_input" mode=""></image>
						<!-- <view class="tis">{{item.label[0]}}</view> -->
					</view>
					<view>
						<view class="user-name">{{item.title}}</view>
						<view class="user-definf ellipsis-multiline">{{item.abstract}}</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>
	<script>
		import footerTer from "../../components/footer_n.vue"
		import {
			Request
		} from '@/utils/request.js'
		
	export default {
		components:{
			footerTer,
		},
	    data() {
	        return {
	            background: ['color1', 'color2', 'color3'],
				banner:[],
				Recommend:[],
				consultList:[],
				jobConList:[],
				unifiendLists:[],
				companyRecommend:[],
				indicatorDots:false,
				scrollTop:0,
				recommendFun:[],
	        }
	    },
		onLoad() {
			// this.tabindexFun();
			// this.specialList();
			//this.joblist();
			//this.questionsList();
			this.getUnifiendLists();
		},
		onPageScroll(e) {
			this.scrollTop=e.scrollTop;
		},
		onShow: function() {
		  //uni.onPageScroll(this.handlePageScroll);
		},
	    methods: {
			// job/getCompanyRecommend

			getCompanyRecommend(){
				Request('job/getCompanyRecommend',{
				}).then(({data}) => {
					const tdata = data || [];
					this.companyRecommend=this.companyRecommend.concat(tdata);
					// this.jobConList = this.jobConList.concat(tdata);
				})
			},
			getUnifiendLists(){
				Request('article/articlelist',{
					limit: 16,
					cid: 13
				}).then((data) => {
					console.log(data)
					const tdata = data || [];
					this.unifiendLists=this.unifiendLists.concat(tdata);
					// this.jobConList = this.jobConList.concat(tdata);
				})
			},
			joblist(){
				Request('job/list').then(({data}) => {
					const tdata = data || [];
					this.jobConList = this.jobConList.concat(tdata);
				})
			},
			goPages(path){
				uni.navigateTo({
					url:path
				})
			},
			tabindexFun(){
				Request('index').then(({banner,Recommend}) => {
					this.banner=banner;
					this.Recommend=Recommend
				})
			},
			///api/special/list
			questionsList(){
				Request('questions/list').then(({banner,list}) => {
					this.recommendFun=list;
					console.log(list)
				})
			},
			
			specialList(){
				Request('special/list').then(({list}) => {
					const tdata = list || [];
					this.consultList = this.consultList.concat(tdata);
				})
			},
	    }
	}
	</script>


<style scoped>
	.scroll-view_H {
			/* white-space: nowrap; */
			width: 100%;
			padding-top: 24rpx;
			padding-bottom: 40rpx;
		}
		.scroll-view-item {
			height: 300rpx;
			line-height: 300rpx;
			text-align: center;
			font-size: 36rpx;
		}
		.scroll-view-item_H {
			display: inline-block;
			width: 100%;
			text-align: center;
			margin-bottom: 24rpx;
			background: #FFFFFF;
			border-radius: 16rpx 16rpx 16rpx 16rpx;
		}
		.scroll-viewconter{
			
		}
		
		.scroll-viewconter .img{
			
		}
		img {
		  width: 100%;
		  height: auto; /* 保持宽高比 */
		}
		
		.scroll-view_H .user-name{
			font-family: PingFang SC, PingFang SC;
			font-weight: 500;
			line-height: 42rpx;
			height: 42rpx;
			font-size: 32rpx;
			padding-bottom: 10rpx;
			color: #0D0E0F;
			font-style: normal;
			text-transform: none;
		}
		.scroll-view_H .user-definf{
			font-family: PingFang SC, PingFang SC;
			font-weight: 400;
			font-size: 22rpx;
			 white-space: pre-wrap;
			color: #8F9294;
		}
		


</style>
